import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ZhongJinTao
 * Date: 2024-03-04
 * Time: 23:33
 */
public class IODemo2 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("./test.txt")) {
            while (true) {
                int n = inputStream.read();
                if(n == -1) {
                    break;
                }
                System.out.printf("%x ", n);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
